package org.chen.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.chen.common.dto.CategoryTreeDTO;
import org.chen.entity.Category;

import java.util.List;

public interface CategoryService extends IService<Category> {
    List<CategoryTreeDTO> getCategoryTree();
    
    List<Category> getSubCategories(Long parentId);
    
    Category getCategoryById(Long id);
    
    Category addCategory(String name, Long parentId, Integer level);
    
    boolean updateCategory(Long id, String name);
    
    boolean deleteCategory(Long id);

    // 新增：批量获取分类信息
    List<Category> getCategoriesByIds(List<Long> ids);
}